/* Custom styles for Sport Mall */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-color: #dee2e6;
}

/* Base styles */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #333;
    background-color: #f8f9fa;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: #0a58ca;
    text-decoration: underline;
}

/* Header styles */
.site-header {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.site-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark-color);
}

.logo:hover {
    text-decoration: none;
    color: var(--primary-color);
}

.logo img {
    max-height: 40px;
}

/* Search form styling */
#search-form {
    width: 100%;
}

#search-form .input-group {
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

#search-input {
    border-right: none;
    padding-left: 15px;
}

#search-form .btn {
    border-top-right-radius: 30px;
    border-bottom-right-radius: 30px;
    padding-left: 20px;
    padding-right: 20px;
}

/* Navigation */
.navbar {
    padding: 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.main-nav {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
}

.main-nav .nav-link {
    color: #333;
    font-weight: 500;
    padding: 1rem 1.5rem;
    position: relative;
    transition: all 0.2s ease;
}

.main-nav .nav-link:hover {
    color: #0066cc;
    background-color: rgba(0,0,0,0.02);
}

.main-nav .nav-link.active {
    font-weight: 600;
    color: #0066cc;
}

.main-nav .nav-link.active:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background-color: #0066cc;
}

/* User navigation */
.nav-item .nav-link {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
}

.nav-item .nav-link i {
    margin-right: 5px;
}

.dropdown-menu {
    border-radius: 0.3rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border: none;
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.08);
}

/* Footer */
.site-footer {
    background-color: #f8f9fa;
    padding: 3rem 0 1.5rem;
    border-top: 1px solid var(--border-color);
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
}

.footer-links a {
    margin-bottom: 0.5rem;
    color: #6c757d;
}

.copyright {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #dee2e6;
    color: #6c757d;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: none;
    width: 40px;
    height: 40px;
    text-align: center;
    border-radius: 50%;
    z-index: 999;
    opacity: 0.7;
}

.back-to-top:hover {
    opacity: 1;
}

/* Carousel */
.carousel-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.carousel-caption {
    background-color: rgba(0,0,0,0.4);
    padding: 15px;
    border-radius: 5px;
}

/* Category and product cards */
.category-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    margin-bottom: 25px;
    text-align: center;
}

.category-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.category-card a {
    text-decoration: none;
    color: #2b3a55;
    display: block;
}

.category-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.category-card h5 {
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #2b3a55;
    margin: 0;
}

.product-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    margin-bottom: 25px;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.product-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    flex: 1;
}

.product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: all 0.3s ease;
    display: block;
}

.product-info {
    padding: 16px;
    background-color: #fff;
    flex: 1;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: #2b3a55;
    margin-bottom: 8px;
    height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-subtitle {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 12px;
    height: 20px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.product-price {
    font-size: 18px;
    font-weight: 600;
    color: #e94560;
}

/* 加入购物车按钮 */
.add-to-cart, .add-to-cart-sm {
    background: transparent;
    color: #e94560;
    border: none;
    border-radius: 0;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: calc(100% - 32px);
    margin: 0 16px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.add-to-cart:hover, .add-to-cart-sm:hover {
    background: transparent;
    color: #c81e45;
    box-shadow: none;
    transform: translateY(-2px);
}

.add-to-cart .fas, .add-to-cart-sm .fas {
    margin-right: 8px;
}

.add-to-cart:disabled, .add-to-cart-sm:disabled {
    background: #adb5bd;
    cursor: not-allowed;
    box-shadow: none;
}

/* Category section */
.category-section {
    padding: 3rem 0;
}

.product-section {
    padding: 40px 0;
}

.category-title {
    font-size: 24px;
    font-weight: 700;
    color: #2b3a55;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
}

.category-title:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: #2b3a55;
}

/* Product Detail */
.product-detail-img {
    width: 100%;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.product-detail-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.product-detail-subtitle {
    color: #666;
    margin-bottom: 15px;
}

.product-detail-price {
    color: #d9534f;
    font-size: 24px;
    font-weight: bold;
}

.quantity-control {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.cart-item {
    margin-bottom: 20px;
}

.cart-item-img img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.item-total {
    color: #d9534f;
    font-weight: bold;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .carousel-item img {
        height: 250px;
    }
    
    .product-card {
        margin-bottom: 20px;
    }
    
    .navbar-nav {
        flex-direction: column;
    }
    
    .main-nav .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .main-nav .nav-link.active:after {
        display: none;
    }
}

/* Filter links */
.filter-link {
    color: #6c757d;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.filter-link:hover {
    color: var(--primary-color);
    text-decoration: none;
    background-color: rgba(13, 110, 253, 0.04);
}

.filter-link.active {
    color: #fff;
    background-color: var(--primary-color);
}

/* Pagination */
.pagination {
    margin-bottom: 0;
}

.page-link {
    color: var(--primary-color);
    border-color: var(--border-color);
    padding: 0.5rem 0.75rem;
}

.page-link:hover {
    color: #0a58ca;
    background-color: #e9ecef;
    border-color: var(--border-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: var(--border-color);
}

/* 商品详情页样式 */
.product-title {
    font-size: 24px;
    font-weight: 700;
    color: #2b3a55;
    margin-bottom: 8px;
}

.current-price {
    font-size: 28px;
    font-weight: 700;
    color: #e94560;
}

.stock-label, .quantity-label {
    font-weight: 600;
    color: #2b3a55;
    margin-right: 8px;
}

.stock-value {
    color: #2b3a55;
}

.product-actions .btn {
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.product-actions .btn-primary {
    background: linear-gradient(135deg, #2b3a55, #3a4f76);
    border: none;
    margin-right: 16px;
}

.product-actions .btn-primary:hover {
    background: linear-gradient(135deg, #3a4f76, #4a6495);
    box-shadow: 0 6px 18px rgba(43, 58, 85, 0.3);
    transform: translateY(-2px);
}

.product-actions .btn-danger {
    background: linear-gradient(135deg, #e94560, #c81e45);
    border: none;
}

.product-actions .btn-danger:hover {
    background: linear-gradient(135deg, #d13f58, #b41a3f);
    box-shadow: 0 6px 18px rgba(233, 69, 96, 0.3);
    transform: translateY(-2px);
}

/* 数量控制按钮 */
.input-group .btn-outline-secondary {
    color: #2b3a55;
    border-color: #ced4da;
}

.input-group .btn-outline-secondary:hover {
    background-color: #f8f9fa;
    color: #3a4f76;
}

/* 购物车相关按钮 */
.btn-outline-danger {
    color: #e94560;
    border-color: #e94560;
}

.btn-outline-danger:hover {
    background-color: #e94560;
    border-color: #e94560;
    color: white;
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
}

#checkout-btn {
    background: linear-gradient(135deg, #2b3a55, #3a4f76);
    border: none;
    box-shadow: 0 4px 12px rgba(43, 58, 85, 0.2);
    transition: all 0.3s ease;
}

#checkout-btn:hover {
    background: linear-gradient(135deg, #3a4f76, #4a6495);
    box-shadow: 0 6px 18px rgba(43, 58, 85, 0.3);
    transform: translateY(-2px);
} 